The present invention relates to the printing of documents stored in a data processing system. More specifically, the present invention relates to systems in which different fonts or founts may be specified for printing.
In the past documents created and stored in data processing systems, such as computers and word processors, were limited in their appearance by the small number of fonts, i.e., the character sets, of a given size and style which were available at the printer.
With daisywheel and golfball printers, the choice of fonts is dependent on which particular detachable cartridge is attached to the printer because the font is pre-formed on the cartridge. This has rendered the printing of graphical data on such printers extremely difficult. With ink-jet printers, thermal printers, laser printers and dot matrix printers, a choice of fonts is normally available in the printer without having to make physical changes. These fonts are called printer fonts or device fonts and are usually held in ROM cartridges or on disk within the printer. Such printers usually also allow new fonts to be transmitted to them which they then store in RAM. These transmitted fonts are commonly known as soft fonts.
System fonts are fonts which are held in the operating system of a computer system and are used to display documents on the display device of the computer system. These fonts may be scalable which means that the size of the font characters may be varied. The introduction of scalable system fonts has meant an increase in the number of different fonts available to the user. These fonts can be used both on the user's display terminal and on the printer even though they have different resolutions and so gives the user better WYSIWYG (what you see is what you get). A drawback of system fonts is that printing is significantly slower than printing using fonts already in the printer. This is because in known systems, the way in which a page of a job or document is printed is that graphical data representing the system font characters is collected in a large bitmap inside the computer system. When all the data for the given page has been processed, the bitmap representing the page is analyzed for rectangles containing non-0 bits (i.e. bits that will print black on he printer) and these rectangles are sent to the printer as bitmaps. Solid black rectangular areas can often be sent by special rectangle-fill commands to the printer. For a full page of text, this bitmap can often be between half a megabyte and a megabyte of data. In contrast, characters drawn using fonts in the printer are sent directly and efficiently as characters to the printer. Some printers also contain scalable fonts and can have scalable fonts transmitted to them. However, even in this case the format used by the printer may be incompatible with that used for the scalable fonts in the computer system and it is almost always the case that an algorithm for translating one format into the other is not available. This makes it difficult to use the same fonts for printing and displaying the same document.
Soft fonts, which are pre-assembled and non-scalable, have been used to increase the fonts available in printers. The range of sizes available for scalable fonts means that it is impractical to have pre-assembled fonts of all possibly required sizes residing permanently either on the computer system or in the printer.
Using fonts stored in the printer has the disadvantage that effects achievable by the computer system such as partially visible characters, i.e., clipped characters, and shaded character, i.e., characters which are to be shown in white on the printed document, may not be achievable by sending commands to the printer.
Viewed from one aspect, the invention provides a method of printing a document stored in a data processing system comprising the steps of:
selecting a document to be printed on a printer linked to said data processing system; PA1 selecting a specified system font for use in printing at least part of said document; PA1 generating character definition data representing said specified system font; PA1 converting said generated character definition data to a format acceptable to said printer as soft font definition data; PA1 transmitting said soft font definition data to said printer; and PA1 transmitting character identification data to said printer for printing said document using said soft font definition data. PA1 (70 charact..times.10 fonts.times.50 pixels.times.50pixels)/8 bits=218,750 bytes for downloading all the fonts required for a document. Assuming that it takes at most 11 bytes to position and print each character and that there are 4,000 characters on each page of the document to be printed, this means that at most 262,750 bytes are required for printing the first page and at most 44,000 bytes for each subsequent page. Experimentation has shown these to be very conservative estimates.
An advantage of printing documents using this method is that less data per page needs to be transmitted to the printer since the sending of full-page bitmaps may be avoided and accordingly printing speed is increased. In addition, systems which store the data to be transmitted on disk, a technique known as spooling, need less storage to store that data. Also, printers without enough RAM to store a full page bitmap may now be able to print such documents. It is surprising that introducing the additional overhead of dynamically downloading fonts to the printer actually produces an overall performance improvement and reduction in the amount of data to be transmitted to the printer.
This is apparent when it is considered that most documents in a word processing environment contain fewer than about 10 fonts. The actual number of distinct characters used in most western language fonts is usually not more than seventy. On a printer which prints three hundred dots per inch, most fonts are around fifty pixels high and wide. Thus sending all the fonts necessary to the printer and then sending the data necessary to position and print each character is at most:
This is a significant saving on the prior art method of printing wherein between one half and one megabyte of data is often required to print each page of a document.
The speed of transmission to the printer is in many cases only around 9,600 bytes per second. The transmission time is usually large in comparison to any processing that needs to be carried out, and so the time taken to generate the soft font definition data can be effectively ignored. In addition, the prior art methods also required processing to produce the full-page bitmaps.